<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>文档与网站架构</title>
    <style>
      /* 去除默认样式 */
      html,
      body {
        margin: 0;
        padding: 0;
      }

      /* 文字排版 */
      h1,
      h2,
      h3 {
        font-family: "Sonsie One", "ZCOOL KuaiLe", cursive;
        color: #2a2a2a;
        margin: 0;
      }

      p,
      input,
      li {
        font-family: "Open Sans Condensed", sans-serif;
        color: #2a2a2a;
        margin: 0;
      }

      h1 {
        font-size: 4rem;
        text-align: center;
        color: white;
        text-shadow: 2px 2px 10px black;
      }

      h2 {
        font-size: 3rem;
        text-align: center;
      }

      h3 {
        font-size: 2.2rem;
        text-align: center;
      }

      p,
      li {
        font-size: 1.6rem;
        line-height: 1.5;
      }

      /* 标题布局 */
      nav,
      article,
      aside,
      footer {
        background-color: white;
        padding: 1%;
        margin-left: 30px;
        margin-right: 30px;
      }

      footer {
        margin: 0;
      }

      header {
        height: 100px;
        text-align: center;
      }

      nav {
        display: flex;
        background-color: #f3f1f5;
        margin-top: 10px;
        margin-bottom: 20px;
      }

      nav ul {
        padding: 0;
        list-style: none;
        flex: 2;
      }

      nav li {
        display: inline;
        flex: 1;
        text-align: center;
        margin-left: 50px;
      }

      nav a {
        font-size: 1.8rem;
        /* 文字反转 */
        text-transform: uppercase;
        /* 文字装饰 */
        text-decoration: none;
        color: black;
        transition-duration: 200ms;
      }

      nav a:hover {
        color: rgb(233, 206, 206);
      }

      nav form {
        flex: 1;
        display: flex;
        align-items: center;
      }

      input {
        height: 32px;
      }

      input[type="search"] {
        flex: 3;
        margin: 0px 10px 0px 10px;
      }

      input[type="submit"] {
        flex: 1;
        background-color: #f0d9ff;
        border: transparent;
        cursor: pointer;
      }

      input[type="submit"]:hover {
        background-color: #bfa2db;
      }

      /* 主区域布局 */
      main {
        display: flex;
        min-height: 500px;
        margin-bottom: 30px;
      }

      main article {
        flex: 6;
      }

      main aside {
        flex: 1;
        display: flex;
        flex-direction: column;
        background-color: #f0d9ff;
      }

      main aside a {
        font-size: 1.3rem;
      }

      footer {
        background-color: #7f7c82;
      }

      footer p {
        font-size: 1.2rem;
        text-align: center;
      }
    </style>
  </head>

  <body>
    <!-- 主标题 -->
    <header>
      <h1>主标题</h1>
    </header>

    <!-- 导航栏 -->
    <nav>
      <ul>
        <li>
          <a href="#">标题一</a>
        </li>
        <li>
          <a href="#">标题二</a>
        </li>
        <li>
          <a href="#">标题三</a>
        </li>
        <li>
          <a href="#">标题四</a>
        </li>
      </ul>
      <!-- 非线性导航区 -->
      <form>
        <input
          type="search"
          name="q"
          placeholder="输入要搜素的内容"
          autocomplete="off"
        />
        <input type="submit" />
      </form>
    </nav>

    <!-- 网站主体 -->
    <main>
      <!-- 文章 -->
      <article>这个一篇文章</article>
      <!-- 侧边栏 -->
      <aside>
        <h3>相关链接</h3>
        <ul>
          <li>
            <a href="http://www.baidu.com">百度一下</a>
          </li>
        </ul>
      </aside>
    </main>

    <!-- 页脚 -->
    <footer>
      <p>2021 Daived所有权利</p>
    </footer>
  </body>
</html>
